package com.tembli.skills.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tembli.skills.dao.ProjectDAO;
import com.tembli.skills.model.Project;
import com.tembli.skills.service.ProjectService;

@Service(value = "projectService")
public class ProjectServiceImpl implements ProjectService {
	@Autowired
	ProjectDAO dao;

	public void setProjectDao(final ProjectDAO dao) {
		this.dao = dao;
	}

	public List getProjects() {
		return dao.getProjects();
	}

	public Project getProject(final String projectId) {
		return dao.getProject(Long.valueOf(projectId));
	}

	public void saveProject(final Project project) {
		dao.saveProject(project);
	}

	public void removeProject(final String projectId) {
		dao.removeProject(Long.valueOf(projectId));
	}
}